fix: Ensure custom resource runtime is at least Node 18#114
fix: Ensure custom resource runtime is at least Node 18#114mnapoli merged 1 commit intooss-serverless:mainfrom
Conversation
GrahamCampbell
left a comment
There was a problem hiding this comment.
I'm not sure we should actually fix this, and instead we could drop support for node 16 early.
|
According to https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html, nodejs18.x is no longer supported. |
|
AWS doesn't advertise this, for obvious reasons, but you can still create and update functions with EOL runtimes via the API (and therefore CloudFormation and Serverless). This check simply ensures backward compatibility without providing any extra support. |
|
@jackylamhk do you think this is the cause behind #128 and brefphp/bref#2034 ? I'm wondering if these failures with custom resources might be related |
It's possible, but I'd want to see the CloudFormation events and CloudWatch logs (if any; as you have asked) to be sure. And I'd also check what |
|
I'm all for dropping support for Node 16, but see #130 and other issues linked, I believe this might be affecting several people. I'll merge this in the meantime to see if it helps. |
Reopens #60
While the default custom resources runtime version has been bumped to Node 22, the plugin still does not make sure that the provider runtime version is at least Node 18.
AWS only includes AWS SDK v2 for Node <= 16 and v3 for Node >= 18 on Lambda. Without this check, the custom resources invocations will fail if the provider runtime is set to Node 16 or lower.